﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <head>
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
        <meta content="history" name="save">
        <meta name="GENERATOR" content="Innovasys HelpStudio Lite (http://www.innovasys.com)">
        <title>SA1008: OpeningParenthesisMustBeSpacedCorrectly</title>
        <link rel="stylesheet" type="text/css" href="stylesheets/helpstudio.css"><link rel="stylesheet" type="text/css" href="styles/Presentation.css">
        <script src="script/helpstudio.js" type="text/javascript"></script>
                <script src="script/StandardText.js" type="text/jscript"></script> 
    </head>
    <body id="hsbody">
            <input type="hidden" id="userDataCache" class="userDataStyle" name="userDataCache" />
            <div id="allHistory" class="saveHistory" onsave="saveScrollPosition()" onload="loadScrollPosition()"></div>
            <script type="text/jscript"> WritePageTop(document.title);</script>
            <div id="pagebody">
                <div id="mainbody">
                    <table>
                        <col />
                        <tr><td><p>TypeName</p></td><td><p>OpeningParenthesisMustBeSpacedCorrectly</p></td></tr>
                        <tr><td><p>CheckId</p></td><td><p>SA1008</p></td></tr>
                        <tr><td><p>Category</p></td><td><p>Spacing Rules</p></td></tr>
                    </table>           
                    <h2>Cause</h2>
                    <P>An opening parenthesis within a C# statement is not spaced correctly.</P>
                    <H2>Rule Description</H2>
                    <P>A violation of this rule occurs when the opening parenthesis within a statement is not spaced correctly. An opening parenthesis should not be preceded by any whitespace, unless it is the first character on the line, or it is preceded by certain C# keywords such as if, while, or for. In addition, an opening parenthesis is allowed to be preceded by whitespace when it follows an operator symbol within an expression.</P>
                    <P>An opening parenthesis should not be followed by whitespace, unless it is the last character on the line.</P>
                    <H2>How to Fix Violations</H2>
                    <P>To fix a violation of this rule, ensure that the spacing around the opening parenthesis follows the rule described above.</P>
                     <h2>How to Suppress Violations</h2>
                <pre>[SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1008:OpeningParenthesisMustBeSpacedCorrectly", Justification = "Reviewed.")]</pre>
            </div>
            <script type="text/jscript">WritePageFooter();</script>     
        </div>
    </body>
</html>